﻿<UserControl x:Class="Sponsorship.Ui.Wpf.Views.SponsorView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid DataContext="{Binding [SponsorViewModel], Source={StaticResource Locator}}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        
        <StackPanel Orientation="Horizontal">
            <Button Content="Speichern" Command="{Binding SaveCommand}"/>
            <Button Content="Abbrechen" Command="{Binding CancelCommand}"/>
        </StackPanel>
        
        <StackPanel Grid.Row="1">
            <TextBlock Text="Vorname"/>
            <TextBox Text="{Binding FirstName, UpdateSourceTrigger=PropertyChanged}"/>
            <TextBlock Text="Nachname"/>
            <TextBox Text="{Binding LastName, UpdateSourceTrigger=PropertyChanged}"/>
            <TextBlock Text="Mail"/>
            <TextBox Text="{Binding EMail, UpdateSourceTrigger=PropertyChanged}"/>
            <TextBlock Text="Telefon"/>
            <TextBox Text="{Binding TelephoneNumber, UpdateSourceTrigger=PropertyChanged}"/>
            <TextBlock Text="Kommentar"/>
            <TextBox Text="{Binding Comment, UpdateSourceTrigger=PropertyChanged}"/>
            <TextBlock Text="Kontonummer"/>
            <TextBox Text="{Binding AccountNumber, UpdateSourceTrigger=PropertyChanged}"/>
            <TextBlock Text="Bankleitzahl"/>
            <TextBox Text="{Binding BankCode, UpdateSourceTrigger=PropertyChanged}"/>

            <TextBlock Text="Straße"/>
            <TextBox Text="{Binding Street, UpdateSourceTrigger=PropertyChanged}"/>
            <TextBlock Text="Nummer"/>
            <TextBox Text="{Binding Number, UpdateSourceTrigger=PropertyChanged}"/>
            <TextBlock Text="Land"/>
            <TextBox Text="{Binding Country, UpdateSourceTrigger=PropertyChanged}"/>
            <TextBlock Text="Ort"/>
            <TextBox Text="{Binding City, UpdateSourceTrigger=PropertyChanged}"/>
            <TextBlock Text="Plz"/>
            <TextBox Text="{Binding Zip, UpdateSourceTrigger=PropertyChanged}"/>
        </StackPanel>
    </Grid>
    
</UserControl>
